import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from './components/Home'
import AboutUs from './components/AboutUs'
import Add from './components/Add'
import Edit from './components/Edit'
import Details from './components/Details'

Vue.use(VueRouter)

export default new VueRouter({
    mode: "history",
    base: __dirname,
    routes: [
        {path: "*", redirect: "/"},
        {name: "Home", path: "/", component: Home},
        {name: "AboutUs", path: "/aboutus", component: AboutUs},
        {name: "Add", path: "/add", component: Add},
        {name: "Edit",path: "/edit/:id", component: Edit},
        {name: "Details", path: "/details/:id", component: Details}
    ]
})